let screenshot = function() { // 输出
	return new Promise((resolve, reject) => {
		let pages = getCurrentPages();
		let page = pages[pages.length - 1];
		let ws = page.$getAppWebview();
		let bitmap = new plus.nativeObj.Bitmap('drawScreen');
		ws.draw(bitmap, (success) => {
			bitmap.save("_doc/drawScreen.jpg", {
				overwrite: true
			}, res => {
				resolve(res.target)
				bitmap.clear();
			}, error => {
				// 保存失败信息
				reject('截屏失败,请重试')
				bitmap.clear(); // 清除Bitmap对象  
			});
		}, error => {
			reject('截屏失败,请重试')
		}, {
			check: true, // 设置为检测白屏  
		});
	})
}
export {
	screenshot
}
